package com.example.healthcondition.services.impl;

import com.example.healthcondition.entity.DietRecords;
import com.example.healthcondition.mapper.DietRecordsMapper;
import com.example.healthcondition.services.DietRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class DietRecordsServiceImpl implements DietRecordsService {

    private final DietRecordsMapper dietRecordsMapper;

    @Autowired
    public DietRecordsServiceImpl(DietRecordsMapper dietRecordsMapper) {
        this.dietRecordsMapper = dietRecordsMapper;
    }

    @Override
    public DietRecords getDietRecordById(Integer recordId) {
        return dietRecordsMapper.selectById(recordId);
    }

    @Override
    public int insertDietRecord(DietRecords dietRecords) {
        return dietRecordsMapper.insertDietRecord(dietRecords);
    }

    // 实现其他业务操作方法（如果有的话）
}